import { Global, Module } from '@nestjs/common'
import { ConfigService } from './config.service'
import { ConfigModule as BaseModule } from '@nestjs/config'
import { PrismaService } from './prisma.service'
import config from '../config'

// 全局注入
@Global()
@Module({
	imports: [
		BaseModule.forRoot({
			load: [config]
		})
	],
	controllers: [],
	providers: [ConfigService, PrismaService],
	exports: [ConfigService, PrismaService]
})
export class CommonModule {}
